package com.hanthink.web.controller.pc.report;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hanthink.common.core.controller.BaseController;
import com.hanthink.common.core.domain.AjaxResult;
import com.hanthink.common.core.page.TableDataInfo;
import com.hanthink.system.domain.report.QualityCheckCollect;
import com.hanthink.system.service.report.IQualityCheckCollectService;

@RestController
@RequestMapping("/app/report/QualityCheckCollect")
public class QualityCheckCollectControll extends BaseController {

	@Autowired
	private IQualityCheckCollectService iQualityCheckCollectService;

	// 查询被动抽查信息列表
	@GetMapping("/passivity/tableList")
	public TableDataInfo tableList(QualityCheckCollect qualityCheckCollect) {
		startPage();
		List<QualityCheckCollect> list = iQualityCheckCollectService.queryPassivityTableList(qualityCheckCollect);
		return getDataTable(list);
	}

	// 查询被动抽查柱形图
	@GetMapping("/passivity/chartList")
	public AjaxResult chartList(QualityCheckCollect qualityCheckCollect) {
		AjaxResult ajax = AjaxResult.success();
		List<QualityCheckCollect> list = iQualityCheckCollectService.queryPassivityChartList(qualityCheckCollect);
		ajax.put("list", list);
		return ajax;
	}
	
	// 查询主动抽查信息列表
	@GetMapping("/initiative/tableList")
	public TableDataInfo initiativeTableList(QualityCheckCollect qualityCheckCollect) {
		startPage();
		List<QualityCheckCollect> list = iQualityCheckCollectService.queryInitiativeTableList(qualityCheckCollect);
		return getDataTable(list);
	}

	// 查询主动抽查柱形图
	@GetMapping("/initiative/chartList")
	public AjaxResult initiativechartList(QualityCheckCollect qualityCheckCollect) {
		AjaxResult ajax = AjaxResult.success();
		List<QualityCheckCollect> list = iQualityCheckCollectService.queryInitiativeChartList(qualityCheckCollect);
		ajax.put("list", list);
		return ajax;
	}
}
